package com.example.proyyj.Service;

import com.example.proyyj.Entity.Building;
import com.example.proyyj.Impl.BuildingImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BuildingService implements BuildingImpl {
    @Resource
    BuildingImpl buildingImpl;



    /**
     * 修改建筑信息
     * @param Name 建筑名称
     * @param Img 建筑图片
     * @param Era 建筑时代
     * @param Classify 分类
     * @param Region 区域
     * @param id 需要修改的建筑id
     */
    @Override
    public int upBuilding(String Name, String Img, String Era, String Classify, String Region, int id) {
        return buildingImpl.upBuilding(Name,Img,Era,Classify,Region,id);
    }

    /**
     * 根据id查询建筑
     * @param id 建筑id
     * @return json
     */
    @Override
    public Building getBuildingById(int id) {
        return buildingImpl.getBuildingById(id);
    }


    @Override
    public List<Building> getBuildingList() {
        return buildingImpl.getBuildingList();
    }

    @Override
    public List<Building> randomBuilding() {
        return buildingImpl.randomBuilding();
    }
}
